package com.zcp.todayheadline;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

@ContentView(R.layout.activity_content)
public class ContentActivity extends AppCompatActivity {
    @ViewInject(R.id.wv)
    WebView wv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        //获得对象
        Intent intent = getIntent();
        //获得路径
        String url = intent.getStringExtra("url");
        wv.setWebViewClient(new WebViewClient());
        //加载数据
        wv.loadUrl(url);
    }
}
